interface Action {
    type: String
}
function counterReducer (state = 0, action:Action) {
    switch (action.type) {
        case 'add':
            return state + 1;
        case 'reduce':
            return state - 1;
        default:
            return state
    }
}

export default counterReducer